public class RubberDuck extends Duck {
    public RubberDuck(String color, double heavy) {
        super(color, heavy);
    }

    // 重载setHeavy方法（参数数量不同）
    public void setHeavy(double heavy) {
        this.heavy = heavy;
        System.out.println("橡皮鸭体重设置为：" + heavy);
    }

    public void setHeavy(double heavy, String unit) {
        this.heavy = heavy;
        System.out.println("橡皮鸭体重设置为：" + heavy + unit);
    }

    // 重写父类方法
    @Override
    public void fly() {
        System.out.println("橡皮鸭不会真的飞行");
    }

    @Override
    public void quack() {
        System.out.println("橡皮鸭发出 squeak 声");
    }
}